<template>
	<view>
		<!-- url为要跳转外链的地址-->
	<web-view :src="url"></web-view>	
	</view>
</template>

<script>
	export default {
		name:"webview",
		data() {
			return {
				url:''
			};
		},
		methods:{
			isNotEmpty(obj){
				if(typeof obj==undefined || obj==null || obj=="" || obj=="undefined" || obj.length==0){
					return false;
				}else{
					return true;
				}
			},
			setTitle(title){
				uni.setNavigationBarTitle({
					title:title
				})
			}
		},
		onLoad(val) {
			console.log('val',val);
			
			this.url=decodeURIComponent(val.url);
			if(this.isNotEmpty(val.title)){
				this.setTitle(val.title);
			}
		}
	}
</script>

<style>

</style>
